{% extends "_layout.html" %}
{% import "component/statistics.njk" as statistics %}

{# 样式代码 #}
{% block style %}
<title>一对一出题-选择班级</title>
{% endblock %}

{# bodyd代码#}
{% block body %}
<div class="mui-content">
    <ul class="mui-table-view">
        {% for item in data%}
        <li class="mui-table-view-cell">
            <a class="mui-navigate-right" href="javascript:void(0)" data-id="{{item.id}}"
               data-cid="{{item.clazzId}}" data-val="{{item.schoolGradeId}}"onclick="js_on(this)">
                {{item.gradeName}}{{item.clazzName}}
                <span class="mui-badge">{{item.clazzCount}}人</span>
            </a>
        </li>
        {%endfor%}
    </ul>
</div>
{% endblock %}

{#js代码#}
{% block js %}
<script>
    function js_on(e){
        sessionStorage.setItem('tzid',$(e).data('val'));
        sessionStorage.setItem('clazzId',$(e).data("cid"));
        sessionStorage.setItem('teacherClazzId',$(e).data("id"));
        window.location.replace("/otohomework2?id="+$(e).data('cid'));
    }

</script>
<!--flotdemo-->
{% endblock %}
